In regards with a sensor such as a stroke sensor which detects the mechanical displacement, it is proposed to make the assembling of the sensor easier by making the structure simple while ensuring the detection accuracy of the sensor. For example, it is proposed to mold the connector terminal by the resin constituting the case, or to connect between the resistance substrate and the connector terminal by a clip (refer to Patent document 1).